/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Adriano
 */
@XmlRootElement
public class Avaliacoes {
    private List<Avaliacao> avaliacoes;

    public Avaliacoes() {
        avaliacoes =  new ArrayList<>();
    }

    public List<Avaliacao> getAvaliacoes() {
        Collections.sort(avaliacoes, new CustomComparator());
        return avaliacoes;
    }

    public void setAvaliacoes(List<Avaliacao> avaliacoes) {
        this.avaliacoes = avaliacoes;
    }
    
    public void addAvaliacao(Avaliacao avaliacao){
        avaliacoes.add(avaliacao);
    }
}
